<script setup lang="ts">
import { ref } from 'vue';
import ClassMate from './ClassMate.vue';
import Teacher from './Teacher.vue';
import Assignment from './Assignment.vue';
import Examination from './Examination.vue';

const props = defineProps<{ courseId: string }>();
const active = ref(0);

const con = () => {
    console.log(props.courseId);
}

</script>

<template>
    <div class="body">
        <van-tabs v-model:active="active">
            <van-tab title="作业">
                <Assignment :courseId="props.courseId"></Assignment>

            </van-tab>
            <van-tab  title="考试">
                <Examination :courseId="props.courseId"></Examination>
            </van-tab>
            <van-tab @click="con" title="班级成员">
                <ClassMate :courseId="props.courseId"></ClassMate>

            </van-tab>
            <van-tab title="教师">
                <Teacher :courseId="props.courseId"></Teacher>
            </van-tab>
        </van-tabs>
    </div>
</template>

<style lang="scss" scoped>
.body {
    display: flex;
    flex-direction: column;
    width: 94%;
    margin: 3%;
}
</style>